import {
    createStore,//创建仓库
    applyMiddleware,//引入中间件
    combineReducers,//合并reducer
} from "redux"
import {
    composeWithDevTools //打开扩展程序
} from "redux-devtools-extension"
import thunk from "redux-thunk" //处理异步中间件

import home from "./modules/home"
import list from "./modules/list"
import login from "./modules/login"
//合并reducer
let reducer = combineReducers({
    home,
    list,
    login
})

//创建仓库
const store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)))

//导出仓库
export default store